﻿using System;
using System.ComponentModel;
using System.Drawing;
using Microsoft.WowAddonStudio.FrameXml.Components.Events;
using Microsoft.WowAddonStudio.FrameXml.Serialization;
using Microsoft.WowAddonStudio.FrameXml.Serialization.LayoutFrames;

namespace Microsoft.WowAddonStudio.FrameXml.Components
{
	[ToolboxBitmap(typeof(System.Windows.Forms.TableLayoutPanel), "TableLayoutPanel.bmp")]
	[ToolboxItemFilter("WowAddonStudio", ToolboxItemFilterType.Require)]
    [EventGroup(EventGroup.TabardModel, EventName.OnLoad)]
    public class TabardModelControl : PlayerModelControl
    {
		/// <summary>
		/// Initializes a new instance of the <see cref="TabardModelControl"/> class.
		/// </summary>
    	public TabardModelControl()
    	{
    	}

    	/// <summary>
        /// Initializes a new instance of the <see cref="TabardModelControl"/> class.
        /// </summary>
        /// <param name="model">The model.</param>
        public TabardModelControl(TabardModel model)
            : base(model)
        {
        }

		/// <summary>
		/// Gets the TabardModel.
		/// </summary>
		public TabardModel TabardModel
		{
			get { return SerializationObject as TabardModel; }
		}

		/// <summary>
		/// Gets the type of the serialization object this control manages.
		/// </summary>
		public override Type SerializationObjectType
		{
			get
			{
				return typeof(TabardModel);
			}
		}

        /// <summary>
        /// Gets the default size of a FrameXML control.
        /// </summary>
        /// <value></value>
        protected override Size DefaultSize
        {
            get { return new Size(175, 146); }
        }
    }
}
